package com.czl.base.data.bean.tengyun

import java.io.Serializable

class PurchaseBean(
    var applicaitonId: Int? = null,
    var applicaitonMoney: String? = null,
    var applicaitonName: String? = null,
    var applicaitonTime: Long? = null,
    var applicaitonTimeStr: String? = null,
    var applicationUserId: Int? = null,
    var applicationUserName: String? = null,
    var createCompanyId: Int? = null,
    var createCompanyName: String? = null,
    var createOrganizationId: Int? = null,
    var createOrganizationName: String? = null,
    var isDelete: Int? = null,
    var isLowasset: Int? = null,
    var isUpdate: Int? = null,
    var note: String? = null,
    var parentCompanyId: Int? = null,
    var parentCompanyName: String? = null,
    var projectId: Int? = null,
    var projectName: String? = null,
    var purchaseCateGory: Int? = null,
    var purchaseType: Int? = null,
    var purchaseTypeName: String? = null,
    var ttStatus: Int? = null,
    var status: Int? = null,
    var statusName: String? = null,
    var taskUserId: String? = null,
    var projectList: MutableList<PurchaseOrderBean?>? = null,
    var fileList: MutableList<FileBean>? = null,
    var fileParamUrl : String? = null,
    var processStatus : Int? = null
) : Serializable {
    fun getPurchaseCount (): Int? {
        if (projectList == null) return null
        var purchaseCount: Int = 0
        for (bean in projectList!!){
            if (bean?.purchaseCount != null)
                purchaseCount += bean.purchaseCount!!.toInt()
        }
        return purchaseCount
    }
    fun getProcessStatusStr(): String {
        if (processStatus != null) {
            if (processStatus == 1 && ttStatus == 1){
                return "已审核"
            }
            return ProcessStatusList[processStatus!!]
        }
        return ""
    }
}

class PurchaseOrderBean(
    var purchaseName: String? = null,
    var purchaseCount: String? = null,
    var assetType: Int? = null,
    var assetTypeName: String? = "请选择资产类型",
    var model: String? = null,
    var unit: String? = "",
    var planPurchaseFee: String? = null,
    var price: String? = null,
    var note: String? = "",
    var purchaseCardId: Int? = null,
    var cardName: String? = null,
    var cardNo: String? = null,
    var contractPhoneNumber: String? = null,
    var contractUserName: String? = null,
    var excuteCompanyId: Int? = null,
    var excuteCompanyName: String? = null,
    var excuteOrganizationId: Int? = null,
    var excuteOrganizationName: String? = null,
    var excuteUserId: Int? = null,
    var excuteUserName: String? = null,
    var isMove: Int? = null,
    var organizationIdList: Array<Int>? = null,
    var parentCompanyId: Int? = null,
    var parentCompanyName: String? = null,
    var projectId: Int? = null,
    var projectName: String? = null,
    var purchaseMoney: String? = null,
    var purchaseTime: String? = null,
    var purchaseType: Int? = null,
    var purchaseTypeName: String? = null,
    var supplyCompanyId: Int? = null,
    var supplyCompanyName: String? = null,
    var supplyType: Int? = null,
    var supplyTypeName: String? = null,
    var position: Int? = null,
    var isDel: Boolean? = false,
    var selected: Boolean = false,
    var selectedInList: Boolean? = false,
    var fileList: MutableList<FileBean>? = null,
    var fileUrl : String? = null
) : Serializable

class FileBean(
    var name: String? = null,
    var url: String? = null,
    var fileName: String? = null,
    var fileUrl: String? = null,
    var tname: String? = null,
    var userName: String? = null,
    var createTime: String? = null,
    var imgOrder: Int? = null,
    var imgUrl: String? = null
) : Serializable

class UsageBean(
    var applicationUseId: Int? = null,
    var applicationTime: String? = null,
    var applicationType: Int? = null,
    var borrowCompanyId: Int? = null,
    var companyId: Int? = null,
    var companyName: String?  = null,
    var facilityCount: Int? = null,
    var facilityCountInfacility: Int? = null,
    var facilityNameAndCountStr: String? = null,
    var goodsType: Int? = null,
    var hasUseCount: Int? = null,
    var hasUseCountInfacility: Int? = null,
    var note: String? = null,
    var organizationName: String? = null,
    var sendbackCount: Int? = null,
    var sendbackCountInfacility: Int? = null,
    var ttStatus: Int? = null,
    var status: Int? = null,
    var statusName: String? = null,
    var unSendBackCountInFacility: Int? = null,
    var userId: Int? = null,
    var userName: String? = null,
    var workId: Int? = null,
    var workNo: String? = null,
    var useTime: String? = null,
    var applicationTitle: String? = null,
    var borrowCompanyName: String? = null,
    var borrowShortCompanyName: String? = null,
    var planSendbakckTime: Long? = null,
    var planSendbakckTimeStr: String? = null,
    var processStatus: Int? = null,
    var taskUserId: String? = null,
    var facilityList: List<FacilitySortBean>? = null
) : Serializable {
    fun getProcessStatusStr(): String {
        if (processStatus != null) {
            if (processStatus == 1 && ttStatus == 1){
                return "已审核"
            }
            return ProcessStatusList[processStatus!!]
        }
        return ""
    }
}

class FacilitySortBean(
    var applicationUseFaclityId : Int? = null,
    var applicationUseId: Int? = null,
    var classificaitonId: Int? = null,
    var classificationId: Int? = null,
    var facilityCount: Int? = null,
    var facilityName: String? = null,
    var hasUseCount : Int? = null,
    var isFlow: Int? = null,
    var model: String? = null,
    var price: Any? = null,
    var sendBackList: List<Any>? = null,
    var sendbackCount: Int? = null,
    var useFacilityList: List<Any>? = null
) : Serializable

class StoreMoveBean(
    var moveId: Int? = null,
    var moveName: String? = null,
    var moveCode: String? = null,
    var moveApprover: String? = null,
    var moveCompanyId: Int? = null,
    var moveCompanyName: String?  = null,
    var moveCompanyShortName: String?  = null,
    var moveStorehouseId: Int? = null,
    var moveStorehouseName: String? = null,
    var applyCompanyId: Int? = null,
    var applyCompanyName: String? = null,
    var applyCompanyShortName: String? = null,
    var applyNo: String? = null,
    var applyOrgId: Int? = null,
    var applyPersonDepartment: String? = null,
    var applyPersonId: Int? = null,
    var applyPersonName: String? = null,
    var applyComment: String? = null,
    var processStatus: Int? = null,
    var ttStatus: Int? = null,
    var status: Int? = null,
    var aduitStatus: Int? = null,
    var aduitStatusName: String? = null,
    var inStatus: Int? = null,
    var inStorehouseId: Int? = null,
    var inStorehouseName: String? = null,
    var isInCompany: Boolean? = null,
    var gmtCreate: String? = null,
    var gmtUpdate: Long? = null,
    var sortInfo: String? = null,
    var taskUserId: String? = null,
    var moveSortViewList: List<Any>? = null,
    var moveProductViewList: List<Any>? = null,
    var sortList: List<MoveSortBean>? = null
) : Serializable {
    fun getProcessStatusStr(): String {
        if (processStatus != null) {
            if (processStatus == 1 && ttStatus == 1){
                return "已审核"
            }
            return ProcessStatusList[processStatus!!]
        }
        return ""
    }
}

class MoveSortBean(
    var sortId : Int? = null,
    var sortModel: String? = null,
    var sortCode: String? = null,
    var sortName: String? = null,
    var applyNum: Int? = null,
    var applySortId: Int? = null,
    var damageNum : Int? = null,
    var inSortId: Int? = null,
    var isPasteCode: Boolean? = null,
    var lendNum: Int? = null,
    var lossesNum: Int? = null,
    var manageMode: Int? = null,
    var manageModeStr: String? = null,
    var pIdPath: String? = null,
    var propCompanyId: Int? = null,
    var propCompanyName: String? = null,
    var propCompanyShortName: String? = null,
    var returnNum: Int? = null,
    var sortPId: Int? = null,
    var sortType: Int? = null,
    var sortTypeStr: String? = null,
    var stockNum: Int? = null,
    var surplusNum: Int? = null,
    var unit: String? = null,
    var useMode: Int? = null,
    var useModeStr: String? = null,
    var valuation: Int? = null,
    var valuationStr: String? = null
) : Serializable

class AddUsageApplyBean (
    var userId: Int? = null,
    var companyId: Int? = null,
    var applicationType: Int? = null,
    var businesstype: Int? = null,
    var workId: String? = null,
    var note: String? = null,
    var list: List<AddApplySortBean>? = null
) : Serializable

class AddApplySortBean (
    var id: Int? = null,
    var name: String? = null,
    var count: Int? = null,
    var type: Int? = null,
    var sortModel: String? = null,
    var applyNum: Int? = null,
    var lendNum: Int? = null,
    var price: String? = null,
    var otherValue: SortBean? = null
) : Serializable

class StoreHouseListBean (
    var storehouseId: Int? = null,
    var storehouseLocatId: Int? = null,
    var storehouseName: String? = null,
    var storeyId: String? = null,
    var roomId: String? = null,
    var buildId: String? = null,
    var companyId: Int? = null,
    var companyName: String? = null,
    var companyShortName: String? = null,
    var departmentPath: String? = null,
    var manageCompanyId: Int? = null,
    var manageCompanyName: String? = null,
    var manageCompanyShortName: String? = null,
    var inuseNum: Int? = null,
    var projectId: Int? = null,
    var stockNum: Int? = null,
    var orgArr: String? = null,
    var latlng: String? = null,
    var userArr: String? = null,
) : Serializable